<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{% block title %}{% endblock %} - 二手商品在线交易平台</title>
    <!-- JQuery相关 -->
    <script type="text/javascript" src="http://nanny.netease.com/pub/js/jquery-latest.min.js"></script>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/cupertino/jquery-ui.css">
    <script type="text/javascript" src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
    <script type="text/javascript" src="/static/script/jquery.ui.datepicker-zh-CN.js"></script>
    <!-- 自定义文件 -->
    <link rel="stylesheet" href="/static/css/MyStyle.css">
    <script type="text/javascript" src="/static/script/Common.js"></script>
    {% block script %}{% endblock %}
</head>
<body>
    <!-- 顶部 -->
    <div id="top">
        <div id="top-container">
            {% if _session %}
                <div id="top-info">
                    <label>
                        {{ _session.user_info.username}}，欢迎归来，
                        您的余额为<strong>{{_session.user_info.account}}</strong>元。
                    </label>
                </div>
                <div id="top-nav">
                    <a href="/">主页</a> | 
                    <a href="/item/new">新建商品</a> | 
                    <a href="/user">我的商品</a> | 
                    <a href="/charge/">余额充值</a> | 
                    <a href="/passport/logout">登出</a>
                </div>
            {% else %}
                <div id="top-info">
                    <label>您好，欢迎来到二手商品在线交易平台！</label>
                </div>
                <div id="top-nav">
                    <a href="/">主页</a> | 
                    <a href="/passport/login">登录</a> | 
                    <a href="/passport/reg">注册</a>
                </div>
            {% endif %}
        </div>
    </div>
    <!-- 主页面部分 -->
    <div id='wrapper'>
        <!-- 搜索栏 -->
        <div id="search">
            <div id="page-title">
                <h1>{{ self.title() }}</h1>
            </div>
            <div id="search-container">
                <input id="search-text" class="input-text" type="text" value="" />
                <button id="search-botton" type="submit" title="搜索">
                    <span class="ui-icon ui-icon-search"></span>
                </button>
            </div>
        </div>
        <!-- 通用的提示框 -->
        <div id="dialog" title="提示">
            <p></p>
        </div>
        <!-- 正文开始 -->
        {% block content %}
        {% endblock %}
    </div>
</body>
</html>
